// C create 创建
// U update 更新
// R read   读取
// D delete 删除

// 1. 导入mongoose
// 2. 连接数据库
// 3. 创建连接回调 connection.on("open",callback)
    // 5. 创建文档解构 new mongoose.Schema()
    // 6. 创建模型对象 mongoose.model()
    // 7. 批量插入 model.insertMany({},callback)

const stuModel = require('./studentsModel');

stuModel.insertMany([{
    name:"旭旭",
    age:15,
    sex:"未知",
    score:19,
    class:'CD0417'
},
{
    name:"富富",
    age:15.5,
    sex:"不详",
    score:20,
    class:'CD0417'
}]);